home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_069 / make / readme.amiga < prev    next >
Text File  |  1992-05-06  |  3KB  |  75 lines

  1. This program is the public domain Make program which appeared on
  2. mod.sources, Volume 7, number 91.  I have ported it to the Amiga under
  3. Manx Aztec C version 3.40a.  This short document assumes you know
  4. Make, and simply points out the Amiga specific features of the
  5. program.  The supported switches are listed in the comment block at
  6. the beginning of module main.c.  I offer no apologies for the fact that
  7. I ran the code through "indent -i4 -nfc1" on the 4.3BSD system at work
  8. before I started working on it.
  9.    The program has been compiled under Manx Aztec C Version 3.40.
  10. It uses Manx's fexecv() function to execute commands and get
  11. their return value, and the Manx dos_packet() function to send an
  12. AmigaDOS packet to the file system for touch'ing purposes.  Lattice
  13. recompilers need to change these (at least).  Peculiar features
  14. of the Amiga version are:
  15.  
  16. (1) The Amiga-specific sections of the code are #ifdef'd on the symbol
  17.     amiga (note the lower case).  I endorse Fred Fish's effort to
  18.     have system and compiler-supplied #define's in lower case to
  19.     ensure no collisions with user-supplied ones.
  20. (2) The file rules.c, routine makerules(), contains the definitions of
  21.     the default built-in rules. For the Amiga, these are equivalent to
  22.     the Makefile:
  23.  
  24.     CC = cc
  25.     CFLAGS = 
  26.     AS = as
  27.     
  28.     .c.o:
  29.         $(CC) $(CFLAGS) $<
  30.     .asm.o:
  31.         $(AS) -o $@ $<
  32.  
  33.     (indented for clarity only).  Thus, one could conceivably do:
  34.         make CC=lc CFLAGS= AS=asm
  35.     to run this make under Lattice C.
  36. (3) If the file S:builtins.make exists, its contents are read in
  37.     instead of the built-in rules defined in makerules().  Thus, you
  38.     can use different default rules on different disks and change
  39.     the default rules without recompiling make.
  40. (4) A Control-D typed during execution of a command by make will cause
  41.     an abort with exit status 1 AFTER the completion of that command.
  42.     Control-C is an immediate abort, as you might expect.
  43. (5) Not really Amiga specific, but worth mentioning, is that characters
  44.     special both to the local operating system (such as : in AmigaDOS) and
  45.     to make may be used in the makefile by preceding them with \
  46.     to temporarily override their special meaning.  For example, to tell
  47.     make that RAM:foo depends on AC:foo.c, write:
  48.  
  49.         RAM\:foo : AC\:foo.c
  50.  
  51. (6) The Aztec fexecv() function, which is used by make to execute its
  52.     commands, only works on programs in directories stored along the
  53.     AmigaDOS PATH, so make sure your PATH includes the appropriate
  54.     directories.
  55.  
  56.     Finally, I added one new feature in the non-machine-specific code:
  57. the name of the makefile can be a single dash "-", in which case a
  58. makefile is read from the standard input.
  59.     About the only feature of "real" make missing here is the
  60. semicolon construct which allows a pair of lines such as the .c.o:
  61. rule and command above to be written as one line, viz:
  62.     .c.o: ; $(CC) $(CFLAGS) $<
  63.  
  64. Enjoy!  Bug reports in the Amiga-specific stuff should be directed to
  65. me;  others should go to caret@fairlight.OZ, the author of the rest of it.
  66. By the way, this code is superior to the Manx-supplied make--more switches
  67. and a better parser;  in fact, this make will handle the Makefile for
  68. MicroGnuEmacs while Manx make chokes on the ln command.
  69.  
  70.                 Steve Walton
  71.                 ametek!walton@csvax.caltech.edu (ARPA)
  72.                 WALTON@CALTECH (BITNET)
  73.                 ...!ucbvax!sun!megatest!ametek!walton
  74.  
  75.